<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="utf-8">
		<title>vue</title>
        <!-- 引入vue文件-->
		<script src="https://cdn.bootcss.com/vue/2.2.2/vue.min.js"></script>
	</head>
	<body>
		<div id="vue">
			<!--循环数组   (值,索引) in 数组-->
			<ul>
				<li v-for="(value,index) in arr">
				 {{index}}  : {{value}}
				</li>
			</ul>
			<hr />
			<!--循环json-->
			<ul>
				<li v-for="(value,key) in json">
				{{key}} : {{value}}
				</li>
			</ul>
		</div>
	</body>
	<script type="application/javascript">
		new Vue({
			el:'#vue',
			data:{
				arr:['哈哈','呵呵','嘿嘿','哼哼'], /*数组*/
				json:{a:'apple',b:'banana',c:'origin'} /*json*/
			}
		})
	</script>
</html>
